/**
 * 链接数据库
 * @type mongoose
 */
const mongoose = require('mongoose');
mongoose.connect('mongodb://localhost/node-app', {useNewUrlParser: true})
    .then(() => {
        console.log('链接成功')
    })
    .catch(err => {
        console.log(err)
    })
